# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=libgovirt
pkgver=0.3.4+9+g82cfd86
pkgrel=1
pkgdesc="GObject-based library to access oVirt REST API"
arch=('i686' 'x86_64')
url="https://www.gnome.org/"
license=('GPL')
depends=('glib2' 'rest')
makedepends=('gobject-introspection' 'git' 'gnome-common')
_commit=82cfd86b978f5e94fae1b028c36bc1ac58cc1374
source=("git://git.gnome.org/libgovirt#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -e 's/^v//' -e 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}
  
build(){
  cd $pkgname
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package(){
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}

check(){
  cd $pkgname
# disable for now: coredumps
#  make check
}
